package com.ncloud.param.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import com.ncloud.param.entity.TableDict;

@Mapper
public interface TableDictMapper{

	@Select("select * from sys_table_dict where code=#{code} and use_tag ='1' order by order_list")
	@Results({@Result(column="code",property="code"),@Result(column="value",property="value"),
		@Result(column="label",property="label"),@Result(column="remark",property="remark")})
	List<TableDict> getDictList(String code);

	@Select("select * from sys_table_dict where code =#{code} and value = #{value} and use_tag ='1'")
	@Results({@Result(column="code",property="code"),@Result(column="value",property="value"),
		@Result(column="label",property="label"),@Result(column="remark",property="remark")})
	TableDict getTableDict(@Param("code") String code, @Param("value") String value);
}
